package com.aq.appserver.server.theme.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import com.fasterxml.jackson.annotation.JsonFormat;

@Entity
@Table(name="Content")
public class Comment {

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private long id;
	
	private String content;
	
	/**
	 * 主题内容类型  '0':文字  '1'：图片  '2'：语音
	 */
	private String contentType;
	
	/**
	 * 主题编码
	 */
	private String themeId;
	
	/**
	 * 回复者手机号码
	 */
	private String phoneNum;
	
	/**
	 * 主题回复标识 '0':自己回复   '1':其他用户回复
	 */
	private String replyTag;
	
	/**
	 * 是否是匿名  '0':'不是' '1':匿名
	 */
	private String anonymousTag;
	
	/**
	 * 位置信息
	 */
	private String position;
	
	/**
	 * 语音时长
	 */
	private int voiceTime;
	
	/**
	 * 缩略图
	 */
	private String thumbUrl;
	
	
	
	@Temporal(value = TemporalType.TIMESTAMP)
	private Date updateTime; 
	
	@Transient
	private String nickName;
	
	/**
	 * 头像地址
	 */
	@Transient
	private String headUrl;
	
	/**
	 * 头像类型
	 */
	@Transient
	private String headType;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getContentType() {
		return contentType;
	}

	public void setContentType(String contentType) {
		this.contentType = contentType;
	}
	
	public String getThemeId() {
		return themeId;
	}

	public void setThemeId(String themeId) {
		this.themeId = themeId;
	}

	public String getReplyTag() {
		return replyTag;
	}

	public void setReplyTag(String replyTag) {
		this.replyTag = replyTag;
	}

	public String getPhoneNum() {
		return phoneNum;
	}

	public void setPhoneNum(String phoneNum) {
		this.phoneNum = phoneNum;
	}

	public String getAnonymousTag() {
		return anonymousTag;
	}

	public void setAnonymousTag(String anonymousTag) {
		this.anonymousTag = anonymousTag;
	}

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public int getVoiceTime() {
		return voiceTime;
	}

	public void setVoiceTime(int voiceTime) {
		this.voiceTime = voiceTime;
	}

	public String getThumbUrl() {
		return thumbUrl;
	}

	public void setThumbUrl(String thumbUrl) {
		this.thumbUrl = thumbUrl;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getHeadUrl() {
		return headUrl;
	}

	public void setHeadUrl(String headUrl) {
		this.headUrl = headUrl;
	}

	public String getHeadType() {
		return headType;
	}

	public void setHeadType(String headType) {
		this.headType = headType;
	}

	public Comment() {
		super();
	}

	public Comment(long id, String content, String contentType,
			String phoneNum, String replyTag, String anonymousTag,
			String position, Date updateTime, String thumbUrl,
			String nickName, int voiceTime) {
		super();
		this.id = id;
		this.content = content;
		this.contentType = contentType;
		this.phoneNum = phoneNum;
		this.replyTag = replyTag;
		this.anonymousTag = anonymousTag;
		this.position = position;
		this.voiceTime = voiceTime;
		this.thumbUrl = thumbUrl;
		this.updateTime = updateTime;
		this.nickName = nickName;
	}
	
	
}
